SingletonIterator

class SingletonIterator<T>(element: T) : Iterator<T>

Iterator producing a single element.

Parameters

element

The element to be produced by the iterator.

T

Type of the element.

Constructors

SingletonIterator
Link copied to clipboard
common
fun <T> SingletonIterator(element: T)
The element to be produced by the iterator.

Functions

hasNext
Link copied to clipboard
common
open operator override fun hasNext(): Boolean
next
Link copied to clipboard
common
open operator override fun next(): T